<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			div{
				border: #000000 1px solid;
			}
			#d1{
				width:150px;
				height:150px
			}
			#d2{
				width:100px;
				height:100px
			}
			#d3{
				width:50px;
				height:50px
			}
		</style>
	</head>
	<body>
		<div id="d1">d1
			<div id="d2">d2
				<div id="d3">d3</div>
			</div>
		</div>
		<script type="text/javascript">
			let divs = document.querySelectorAll("div")
			for (let i = 0; i < divs.length; i++) {
			 divs[i].addEventListener("click",f1,true)
			  divs[i].addEventListener("click",f2,false)
			}
			function f1(){
				console.log(event.currentTarget.id);
			}
			function f2(){
				console.log(event.currentTarget.id);
			}
			</script>
		</body>
</html>
